1. Field of the Invention
The present invention relates to a data protection system for a memory having a battery to protect the data stored in the memory from accidental power OFF. More particularly, it relates to a battery voltage protection system for protecting a non-volatile type memory provided in a device controller, for example, a disk controller, between a channel system and an external storage device in a data processing system.
2. Description of the Related Art
Recently, a non-volatile type memory having a battery back-up system, which can protect the data from accidental power OFF, is widely utilized in data processing systems. In this case, the battery must be always sufficiently charged to deal with an accidental power OFF. That is, if the battery is always sufficiently charged when the power supply is normal, it is possible to perform the back-up operation when the power source is accidentally interrupted.
Further, this memory is utilized for storing not only relatively unimportant data, for example, log data for recovering the system, but also relatively important data, for example, a user's data. Accordingly, the battery back-up system must operate precisely to protect the important data from an accidental power OFF so that it is necessary to always check the battery back-up function,
One method, a so-called "patrol check" is known for checking the battery voltage. For example, Japanese Unexamined Patent Publication (Kokai) No. 58-146099 discloses a memory protection system utilizing this patrol check. In this system, the battery voltage is checked in such a way that it is compared with a reference voltage after the power source is disconnected. That is, in FIG. 4 of the reference, a switch is connected to a comparator when checking the battery voltage. In this case, the neutral point of the switch is connected to the common point of a diode and the battery in order to prevent the surge voltage caused by, the switching of the switch. A memory is also included. Although this system is advantageous for checking deterioration of the battery, it cannot protect the data stored in the memory since it cannot previously detect the accidental power OFF.
Japanese Unexamined Patent Publication (Kokai) No. 62-8212 also discloses a battery voltage detection circuit for a memory in a battery back-up system. This circuit comprises two comparators each having different reference voltages for comparing a battery voltage as shown in FIG. 1 of the reference. A display element lights when the battery voltage lies between the first and second reference voltages or is lower than the second reference voltage. In the latter case, the brightness of the display element is increased. The battery voltage is always checked in this circuit. Although this system is advantageous for checking for deterioration of the battery, it cannot protect the data stored in the memory since it can not previously detect an accidental power OFF.
Still further, Japanese Unexamined Patent Publication (Kokai) No. 56-103722 discloses a battery voltage detection system for detecting an abnormal state of the battery voltage. In FIGS. 1 and 2 of this reference include, a power source unit, a power control unit, a memory, a battery, a battery voltage detection unit, voltage comparators, terminals, a control unit and a display unit. The power control unit controls the power supply to the memory, and the battery voltage detection unit always supervises the battery voltage and detects abnormal states thereof. The battery voltage detection unit includes a plurality of comparators each having different reference voltages. A volatile type of memory is used as the memory.